{include file='_header'}
<div class="page-header">当前位置：<span class="text-primary">{if $type=='credit1'}积分{else}余额{/if}明细</span></div>
<div class="page-content">
    <form action="" method="get" class="form-horizontal" role="form" id="form1">
        <div class="page-toolbar">
            <div class="input-group">
                <span class="pull-left">
                    {:tpl_daterange('time', array('sm'=>true,'placeholder'=>'操作时间'),true);}
                </span>
                <span class="input-group-select">
                    <select name="groupid" class="form-control" style="width:100px;float: left;"  >
                        <option value="">会员分组</option>
                        {foreach name='groups' item='group'}
                        <option value="{$group['id']}" {if $_GET['groupid']==$group['id']}selected{/if}>{$group['groupname']}</option>
                        {/foreach}
                    </select>
                </span>
                <span class="input-group-select">
                    <select name="level" class="form-control" style="width:100px;float: left;"  >
                        <option value="">会员等级</option>
                        {foreach name='levels' item='level'}
                        <option value="{$level['id']}" {if $_GET['level']==$level['id']}selected{/if}>{$level['levelname']}</option>
                        {/foreach}
                    </select>
                </span>
                <input type="text" class="form-control "  name="keyword" value="{$_GET['keyword']}" placeholder="请输入会员信息/操作人信息" />
                <span class="input-group-btn">
                    <button class="btn  btn-primary" type="submit"> 搜索</button>
                    {if $type=='credit'}
                        <button type="submit" name="export" value="1" class="btn btn-success ">导出</button>
                    {else}
                        <button type="submit" name="export" value="1" class="btn btn-success ">导出</button>
                    {/if}
                </span>
            </div>
        </div>
    </form>
    {if count($list) <= 0}
    <div class="panel panel-default">
        <div class="panel-body empty-data">未查询到相关数据</div>
    </div>
    {else}
    <div class="row">
        <div class="col-md-12">
            <table class="table">
                <thead class="navbar-inner">
                <tr>
                    <th style='width:120px;'>粉丝</th>
                    <th style='width:100px;'>会员信息</th>
                    <th style='width:80px;'>{if $type=='credit1'}积分{else}余额{/if}变化</th>
                    <th style='width:80px;'>备注</th>
                    <th style='width:80px;'>操作人</th>
                    <th style='width:100px;'>操作时间</th>
                </tr>
                </thead>
                <tbody>
                {foreach name='list' item='row'}
                <tr >
                    <td>
                    <a  href="{:url('admin/member/detail',array('id' => $row['mid']));}" target='_blank'>
                        <img  class="radius50"  src='{$row['avatar']}' style='width:30px;height:30px;padding:1px;border:1px solid #ccc' onerror="this.src='/public/static/images/noface.png'"/> {$row['nickname']}
                    </a>
                    </td>
                    <td>{$row['realname']}<br/>{$row['mobile']}</td>
                    <td>{$row['num']}</td>
                    <td data-toggle='popover' data-html='true' data-placement='top' data-trigger='hover' data-content='{$row['remark']}'>{$row['remark']}</td>
                    <td>{if empty($row['username'])}系统{else}{$row['username']}{/if}</td>
                    <td>{:date('Y-m-d H:i:s',$row['createtime'])}</td>
                </tr>
                {/foreach}
                </tbody>
                <tfoot>
                <tr>
                    <td>
                        <div class="btn-group"></div>
                    </td>
                    <td colspan="5" style="text-align: right">
                        {$pager}
                    </td>
                </tr>
                </tfoot>
            </table>
        </div>
    </div>
    {/if}
</div>

{include file='_footer'}